package com.molichuxing.gateway.bff.order.entity.response;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.services.property.OrderSourceEnum;
import com.molichuxing.services.property.OrderSubscribeStatusEnum;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 订阅里程订单详情基础信息
 * 
 * @author zoumingyu
 * @date 2019年8月24日
 *
 */
@Data
public class OrderSubscribeBaseVo extends ResponseRootDto {
	private static final long serialVersionUID = 3648265274516900518L;

	@ApiModelProperty(value = "订单号")
	private Long orderCode;

	@ApiModelProperty(value = "下单时间")
	private LocalDateTime orderTime;

	@ApiModelProperty(value = "订单来源（1：智能终端（AIO），2：手机APP（Android），3：手机APP（IOS），4：微信小程序（APPLET），5：微信公众号（JSAPI），6：H5页面（MWEB））")
	private Integer source;

	@ApiModelProperty(value = "订单来源str")
	private String sourceStr;

	@ApiModelProperty(value = "下单门店id")
	private Integer placeStoreId;

	@ApiModelProperty(value = "下单门店")
	private String placeStoreName;

	@ApiModelProperty(value = "商品编码 ")
	private String goodsCode;

	@ApiModelProperty(value = "商品品类(1：专属，2：订阅) ")
	private Integer businessType;

	@ApiModelProperty(value = "商品品类(业务类型) ")
	private String businessTypeStr;

	@ApiModelProperty(value = "用车时长")
	private Integer transportTime;

	@ApiModelProperty(value = "总里程(包涵加购里程)")
	private Integer totalMileage;

	@ApiModelProperty(value = "车型名称id")
	private Integer vehicleId;

	@ApiModelProperty(value = "车型名称")
	private String vehicleName;

	@ApiModelProperty(value = "车牌号")
	private String licensePlate;

	@ApiModelProperty(value = "车架号")
	private String vin;

	@ApiModelProperty(value = "租金(不含保证金)")
	private BigDecimal cartFee;

	@ApiModelProperty(value = "保证金")
	private BigDecimal deposit;

	@ApiModelProperty(value = "订单总金额（包含保证金）")
	private BigDecimal totalAmount;

	@ApiModelProperty(value = "订单状态()")
	private Integer orderStatus;

	@ApiModelProperty(value = "订单状态str")
	private String orderStatusStr;

	@ApiModelProperty(value = "是否续订单（0：否，1：是）")
	private Boolean isRenew;

	public void setSource(OrderSourceEnum source) {
		this.source = source == null ? null : source.getValue();
		this.sourceStr = source == null ? null : source.getName();
	}

	public void setOrderStatus(OrderSubscribeStatusEnum orderStatus) {
		this.orderStatus = orderStatus == null ? null : orderStatus.getValue();
		this.orderStatusStr = orderStatus == null ? null : orderStatus.getName();
	}

}
